home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / dev / gcc / ppc-mos-gcc.lha / info / gcc.info-4 (.txt) < prev    next >
GNU Info File  |  2002-06-18  |  46KB  |  883 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3. INFO-DIR-SECTION Programming
  4. START-INFO-DIR-ENTRY
  5. * gcc: (gcc).                  The GNU Compiler Collection.
  6. END-INFO-DIR-ENTRY
  7.    This file documents the use and the internals of the GNU compiler.
  8.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  9. Boston, MA 02111-1307 USA
  10.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  11. 1999, 2000 Free Software Foundation, Inc.
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License" and "Funding
  18. for Free Software" are included exactly as in the original, and
  19. provided that the entire resulting derived work is distributed under
  20. the terms of a permission notice identical to this one.
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "GNU General Public
  24. License" and "Funding for Free Software", and this permission notice,
  25. may be included in translations approved by the Free Software Foundation
  26. instead of in the original English.
  27. File: gcc.info,  Node: Directory Options,  Next: Target Options,  Prev: Link Options,  Up: Invoking GCC
  28. Options for Directory Search
  29. ============================
  30.    These options specify directories to search for header files, for
  31. libraries and for parts of the compiler:
  32. `-IDIR'
  33.      Add the directory DIR to the head of the list of directories to be
  34.      searched for header files.  This can be used to override a system
  35.      header file, substituting your own version, since these
  36.      directories are searched before the system header file
  37.      directories.  If you use more than one `-I' option, the
  38.      directories are scanned in left-to-right order; the standard
  39.      system directories come after.
  40. `-I-'
  41.      Any directories you specify with `-I' options before the `-I-'
  42.      option are searched only for the case of `#include "FILE"'; they
  43.      are not searched for `#include <FILE>'.
  44.      If additional directories are specified with `-I' options after
  45.      the `-I-', these directories are searched for all `#include'
  46.      directives.  (Ordinarily *all* `-I' directories are used this way.)
  47.      In addition, the `-I-' option inhibits the use of the current
  48.      directory (where the current input file came from) as the first
  49.      search directory for `#include "FILE"'.  There is no way to
  50.      override this effect of `-I-'.  With `-I.' you can specify
  51.      searching the directory which was current when the compiler was
  52.      invoked.  That is not exactly the same as what the preprocessor
  53.      does by default, but it is often satisfactory.
  54.      `-I-' does not inhibit the use of the standard system directories
  55.      for header files.  Thus, `-I-' and `-nostdinc' are independent.
  56. `-LDIR'
  57.      Add directory DIR to the list of directories to be searched for
  58.      `-l'.
  59. `-BPREFIX'
  60.      This option specifies where to find the executables, libraries,
  61.      include files, and data files of the compiler itself.
  62.      The compiler driver program runs one or more of the subprograms
  63.      `cpp', `cc1', `as' and `ld'.  It tries PREFIX as a prefix for each
  64.      program it tries to run, both with and without `MACHINE/VERSION/'
  65.      (*note Target Options::.).
  66.      For each subprogram to be run, the compiler driver first tries the
  67.      `-B' prefix, if any.  If that name is not found, or if `-B' was
  68.      not specified, the driver tries two standard prefixes, which are
  69.      `/usr/lib/gcc/' and `/usr/local/lib/gcc-lib/'.  If neither of
  70.      those results in a file name that is found, the unmodified program
  71.      name is searched for using the directories specified in your
  72.      `PATH' environment variable.
  73.      `-B' prefixes that effectively specify directory names also apply
  74.      to libraries in the linker, because the compiler translates these
  75.      options into `-L' options for the linker.  They also apply to
  76.      includes files in the preprocessor, because the compiler
  77.      translates these options into `-isystem' options for the
  78.      preprocessor.  In this case, the compiler appends `include' to the
  79.      prefix.
  80.      The run-time support file `libgcc.a' can also be searched for using
  81.      the `-B' prefix, if needed.  If it is not found there, the two
  82.      standard prefixes above are tried, and that is all.  The file is
  83.      left out of the link if it is not found by those means.
  84.      Another way to specify a prefix much like the `-B' prefix is to use
  85.      the environment variable `GCC_EXEC_PREFIX'.  *Note Environment
  86.      Variables::.
  87. `-specs=FILE'
  88.      Process FILE after the compiler reads in the standard `specs'
  89.      file, in order to override the defaults that the `gcc' driver
  90.      program uses when determining what switches to pass to `cc1',
  91.      `cc1plus', `as', `ld', etc.  More than one `-specs='FILE can be
  92.      specified on the command line, and they are processed in order,
  93.      from left to right.
  94. File: gcc.info,  Node: Target Options,  Next: Submodel Options,  Prev: Directory Options,  Up: Invoking GCC
  95. Specifying Target Machine and Compiler Version
  96. ==============================================
  97.    By default, GCC compiles code for the same type of machine that you
  98. are using.  However, it can also be installed as a cross-compiler, to
  99. compile for some other type of machine.  In fact, several different
  100. configurations of GCC, for different target machines, can be installed
  101. side by side.  Then you specify which one to use with the `-b' option.
  102.    In addition, older and newer versions of GCC can be installed side
  103. by side.  One of them (probably the newest) will be the default, but
  104. you may sometimes wish to use another.
  105. `-b MACHINE'
  106.      The argument MACHINE specifies the target machine for compilation.
  107.      This is useful when you have installed GCC as a cross-compiler.
  108.      The value to use for MACHINE is the same as was specified as the
  109.      machine type when configuring GCC as a cross-compiler.  For
  110.      example, if a cross-compiler was configured with `configure
  111.      i386v', meaning to compile for an 80386 running System V, then you
  112.      would specify `-b i386v' to run that cross compiler.
  113.      When you do not specify `-b', it normally means to compile for the
  114.      same type of machine that you are using.
  115. `-V VERSION'
  116.      The argument VERSION specifies which version of GCC to run.  This
  117.      is useful when multiple versions are installed.  For example,
  118.      VERSION might be `2.0', meaning to run GCC version 2.0.
  119.      The default version, when you do not specify `-V', is the last
  120.      version of GCC that you installed.
  121.    The `-b' and `-V' options actually work by controlling part of the
  122. file name used for the executable files and libraries used for
  123. compilation.  A given version of GCC, for a given target machine, is
  124. normally kept in the directory `/usr/local/lib/gcc-lib/MACHINE/VERSION'.
  125.    Thus, sites can customize the effect of `-b' or `-V' either by
  126. changing the names of these directories or adding alternate names (or
  127. symbolic links).  If in directory `/usr/local/lib/gcc-lib/' the file
  128. `80386' is a link to the file `i386v', then `-b 80386' becomes an alias
  129. for `-b i386v'.
  130.    In one respect, the `-b' or `-V' do not completely change to a
  131. different compiler: the top-level driver program `gcc' that you
  132. originally invoked continues to run and invoke the other executables
  133. (preprocessor, compiler per se, assembler and linker) that do the real
  134. work.  However, since no real work is done in the driver program, it
  135. usually does not matter that the driver program in use is not the one
  136. for the specified target and version.
  137.    The only way that the driver program depends on the target machine is
  138. in the parsing and handling of special machine-specific options.
  139. However, this is controlled by a file which is found, along with the
  140. other executables, in the directory for the specified version and
  141. target machine.  As a result, a single installed driver program adapts
  142. to any specified target machine and compiler version.
  143.    The driver program executable does control one significant thing,
  144. however: the default version and target machine.  Therefore, you can
  145. install different instances of the driver program, compiled for
  146. different targets or versions, under different names.
  147.    For example, if the driver for version 2.0 is installed as `ogcc'
  148. and that for version 2.1 is installed as `gcc', then the command `gcc'
  149. will use version 2.1 by default, while `ogcc' will use 2.0 by default.
  150. However, you can choose either version with either command with the
  151. `-V' option.
  152. File: gcc.info,  Node: Submodel Options,  Next: Code Gen Options,  Prev: Target Options,  Up: Invoking GCC
  153. Hardware Models and Configurations
  154. ==================================
  155.    Earlier we discussed the standard option `-b' which chooses among
  156. different installed compilers for completely different target machines,
  157. such as Vax vs. 68000 vs. 80386.
  158.    In addition, each of these target machine types can have its own
  159. special options, starting with `-m', to choose among various hardware
  160. models or configurations--for example, 68010 vs 68020, floating
  161. coprocessor or none.  A single installed version of the compiler can
  162. compile for any model or configuration, according to the options
  163. specified.
  164.    Some configurations of the compiler also support additional special
  165. options, usually for compatibility with other compilers on the same
  166. platform.
  167.    These options are defined by the macro `TARGET_SWITCHES' in the
  168. machine description.  The default for the options is also defined by
  169. that macro, which enables you to change the defaults.
  170. * Menu:
  171. * M680x0 Options::
  172. * VAX Options::
  173. * SPARC Options::
  174. * Convex Options::
  175. * AMD29K Options::
  176. * ARM Options::
  177. * Thumb Options::
  178. * MN10200 Options::
  179. * MN10300 Options::
  180. * M32R/D Options::
  181. * M88K Options::
  182. * RS/6000 and PowerPC Options::
  183. * RT Options::
  184. * MIPS Options::
  185. * i386 Options::
  186. * HPPA Options::
  187. * Intel 960 Options::
  188. * DEC Alpha Options::
  189. * Clipper Options::
  190. * H8/300 Options::
  191. * SH Options::
  192. * System V Options::
  193. * TMS320C3x/C4x Options::
  194. * V850 Options::
  195. * ARC Options::
  196. * NS32K Options::
  197. File: gcc.info,  Node: M680x0 Options,  Next: VAX Options,  Up: Submodel Options
  198. M680x0 Options
  199. --------------
  200.    These are the `-m' options defined for the 68000 series.  The default
  201. values for these options depends on which style of 68000 was selected
  202. when the compiler was configured; the defaults for the most common
  203. choices are given below.
  204. `-m68000'
  205. `-mc68000'
  206.      Generate output for a 68000.  This is the default when the
  207.      compiler is configured for 68000-based systems.
  208.      Use this option for microcontrollers with a 68000 or EC000 core,
  209.      including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
  210. `-m68020'
  211. `-mc68020'
  212.      Generate output for a 68020.  This is the default when the
  213.      compiler is configured for 68020-based systems.
  214. `-m68881'
  215.      Generate output containing 68881 instructions for floating point.
  216.      This is the default for most 68020 systems unless `-nfp' was
  217.      specified when the compiler was configured.
  218. `-m68030'
  219.      Generate output for a 68030.  This is the default when the
  220.      compiler is configured for 68030-based systems.
  221. `-m68040'
  222.      Generate output for a 68040.  This is the default when the
  223.      compiler is configured for 68040-based systems.
  224.      This option inhibits the use of 68881/68882 instructions that have
  225.      to be emulated by software on the 68040.  Use this option if your
  226.      68040 does not have code to emulate those instructions.
  227. `-m68060'
  228.      Generate output for a 68060.  This is the default when the
  229.      compiler is configured for 68060-based systems.
  230.      This option inhibits the use of 68020 and 68881/68882 instructions
  231.      that have to be emulated by software on the 68060.  Use this
  232.      option if your 68060 does not have code to emulate those
  233.      instructions.
  234. `-mcpu32'
  235.      Generate output for a CPU32. This is the default when the compiler
  236.      is configured for CPU32-based systems.
  237.      Use this option for microcontrollers with a CPU32 or CPU32+ core,
  238.      including the 68330, 68331, 68332, 68333, 68334, 68336, 68340,
  239.      68341, 68349 and 68360.
  240. `-m5200'
  241.      Generate output for a 520X "coldfire" family cpu.  This is the
  242.      default when the compiler is configured for 520X-based systems.
  243.      Use this option for microcontroller with a 5200 core, including
  244.      the MCF5202, MCF5203, MCF5204 and MCF5202.
  245. `-m68020-40'
  246.      Generate output for a 68040, without using any of the new
  247.      instructions.  This results in code which can run relatively
  248.      efficiently on either a 68020/68881 or a 68030 or a 68040.  The
  249.      generated code does use the 68881 instructions that are emulated
  250.      on the 68040.
  251. `-m68020-60'
  252.      Generate output for a 68060, without using any of the new
  253.      instructions.  This results in code which can run relatively
  254.      efficiently on either a 68020/68881 or a 68030 or a 68040.  The
  255.      generated code does use the 68881 instructions that are emulated
  256.      on the 68060.
  257. `-mfpa'
  258.      Generate output containing Sun FPA instructions for floating point.
  259. `-msoft-float'
  260.      Generate output containing library calls for floating point.
  261.      *Warning:* the requisite libraries are not available for all m68k
  262.      targets.  Normally the facilities of the machine's usual C
  263.      compiler are used, but this can't be done directly in
  264.      cross-compilation.  You must make your own arrangements to provide
  265.      suitable library functions for cross-compilation.  The embedded
  266.      targets `m68k-*-aout' and `m68k-*-coff' do provide software
  267.      floating point support.
  268. `-mshort'
  269.      Consider type `int' to be 16 bits wide, like `short int'.
  270. `-mnobitfield'
  271.      Do not use the bit-field instructions.  The `-m68000', `-mcpu32'
  272.      and `-m5200' options imply `-mnobitfield'.
  273. `-mbitfield'
  274.      Do use the bit-field instructions.  The `-m68020' option implies
  275.      `-mbitfield'.  This is the default if you use a configuration
  276.      designed for a 68020.
  277. `-mrtd'
  278.      Use a different function-calling convention, in which functions
  279.      that take a fixed number of arguments return with the `rtd'
  280.      instruction, which pops their arguments while returning.  This
  281.      saves one instruction in the caller since there is no need to pop
  282.      the arguments there.
  283.      This calling convention is incompatible with the one normally used
  284.      on Unix, so you cannot use it if you need to call libraries
  285.      compiled with the Unix compiler.
  286.      Also, you must provide function prototypes for all functions that
  287.      take variable numbers of arguments (including `printf'); otherwise
  288.      incorrect code will be generated for calls to those functions.
  289.      In addition, seriously incorrect code will result if you call a
  290.      function with too many arguments.  (Normally, extra arguments are
  291.      harmlessly ignored.)
  292.      The `rtd' instruction is supported by the 68010, 68020, 68030,
  293.      68040, 68060 and CPU32 processors, but not by the 68000 or 5200.
  294. `-malign-int'
  295. `-mno-align-int'
  296.      Control whether GCC aligns `int', `long', `long long', `float',
  297.      `double', and `long double' variables on a 32-bit boundary
  298.      (`-malign-int') or a 16-bit boundary (`-mno-align-int').  Aligning
  299.      variables on 32-bit boundaries produces code that runs somewhat
  300.      faster on processors with 32-bit busses at the expense of more
  301.      memory.
  302.      *Warning:* if you use the `-malign-int' switch, GCC will align
  303.      structures containing the above types  differently than most
  304.      published application binary interface specifications for the m68k.
  305. File: gcc.info,  Node: VAX Options,  Next: SPARC Options,  Prev: M680x0 Options,  Up: Submodel Options
  306. VAX Options
  307. -----------
  308.    These `-m' options are defined for the Vax:
  309. `-munix'
  310.      Do not output certain jump instructions (`aobleq' and so on) that
  311.      the Unix assembler for the Vax cannot handle across long ranges.
  312. `-mgnu'
  313.      Do output those jump instructions, on the assumption that you will
  314.      assemble with the GNU assembler.
  315. `-mg'
  316.      Output code for g-format floating point numbers instead of
  317.      d-format.
  318. File: gcc.info,  Node: SPARC Options,  Next: Convex Options,  Prev: VAX Options,  Up: Submodel Options
  319. SPARC Options
  320. -------------
  321.    These `-m' switches are supported on the SPARC:
  322. `-mno-app-regs'
  323. `-mapp-regs'
  324.      Specify `-mapp-regs' to generate output using the global registers
  325.      2 through 4, which the SPARC SVR4 ABI reserves for applications.
  326.      This is the default.
  327.      To be fully SVR4 ABI compliant at the cost of some performance
  328.      loss, specify `-mno-app-regs'.  You should compile libraries and
  329.      system software with this option.
  330. `-mfpu'
  331. `-mhard-float'
  332.      Generate output containing floating point instructions.  This is
  333.      the default.
  334. `-mno-fpu'
  335. `-msoft-float'
  336.      Generate output containing library calls for floating point.
  337.      *Warning:* the requisite libraries are not available for all SPARC
  338.      targets.  Normally the facilities of the machine's usual C
  339.      compiler are used, but this cannot be done directly in
  340.      cross-compilation.  You must make your own arrangements to provide
  341.      suitable library functions for cross-compilation.  The embedded
  342.      targets `sparc-*-aout' and `sparclite-*-*' do provide software
  343.      floating point support.
  344.      `-msoft-float' changes the calling convention in the output file;
  345.      therefore, it is only useful if you compile *all* of a program with
  346.      this option.  In particular, you need to compile `libgcc.a', the
  347.      library that comes with GCC, with `-msoft-float' in order for this
  348.      to work.
  349. `-mhard-quad-float'
  350.      Generate output containing quad-word (long double) floating point
  351.      instructions.
  352. `-msoft-quad-float'
  353.      Generate output containing library calls for quad-word (long
  354.      double) floating point instructions.  The functions called are
  355.      those specified in the SPARC ABI.  This is the default.
  356.      As of this writing, there are no sparc implementations that have
  357.      hardware support for the quad-word floating point instructions.
  358.      They all invoke a trap handler for one of these instructions, and
  359.      then the trap handler emulates the effect of the instruction.
  360.      Because of the trap handler overhead, this is much slower than
  361.      calling the ABI library routines.  Thus the `-msoft-quad-float'
  362.      option is the default.
  363. `-mno-epilogue'
  364. `-mepilogue'
  365.      With `-mepilogue' (the default), the compiler always emits code for
  366.      function exit at the end of each function.  Any function exit in
  367.      the middle of the function (such as a return statement in C) will
  368.      generate a jump to the exit code at the end of the function.
  369.      With `-mno-epilogue', the compiler tries to emit exit code inline
  370.      at every function exit.
  371. `-mno-flat'
  372. `-mflat'
  373.      With `-mflat', the compiler does not generate save/restore
  374.      instructions and will use a "flat" or single register window
  375.      calling convention.  This model uses %i7 as the frame pointer and
  376.      is compatible with the normal register window model.  Code from
  377.      either may be intermixed.  The local registers and the input
  378.      registers (0-5) are still treated as "call saved" registers and
  379.      will be saved on the stack as necessary.
  380.      With `-mno-flat' (the default), the compiler emits save/restore
  381.      instructions (except for leaf functions) and is the normal mode of
  382.      operation.
  383. `-mno-unaligned-doubles'
  384. `-munaligned-doubles'
  385.      Assume that doubles have 8 byte alignment.  This is the default.
  386.      With `-munaligned-doubles', GCC assumes that doubles have 8 byte
  387.      alignment only if they are contained in another type, or if they
  388.      have an absolute address.  Otherwise, it assumes they have 4 byte
  389.      alignment.  Specifying this option avoids some rare compatibility
  390.      problems with code generated by other compilers.  It is not the
  391.      default because it results in a performance loss, especially for
  392.      floating point code.
  393. `-mv8'
  394. `-msparclite'
  395.      These two options select variations on the SPARC architecture.
  396.      By default (unless specifically configured for the Fujitsu
  397.      SPARClite), GCC generates code for the v7 variant of the SPARC
  398.      architecture.
  399.      `-mv8' will give you SPARC v8 code.  The only difference from v7
  400.      code is that the compiler emits the integer multiply and integer
  401.      divide instructions which exist in SPARC v8 but not in SPARC v7.
  402.      `-msparclite' will give you SPARClite code.  This adds the integer
  403.      multiply, integer divide step and scan (`ffs') instructions which
  404.      exist in SPARClite but not in SPARC v7.
  405.      These options are deprecated and will be deleted in a future GCC
  406.      release.  They have been replaced with `-mcpu=xxx'.
  407. `-mcypress'
  408. `-msupersparc'
  409.      These two options select the processor for which the code is
  410.      optimised.
  411.      With `-mcypress' (the default), the compiler optimizes code for the
  412.      Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx
  413.      series.  This is also appropriate for the older SparcStation 1, 2,
  414.      IPX etc.
  415.      With `-msupersparc' the compiler optimizes code for the SuperSparc
  416.      cpu, as used in the SparcStation 10, 1000 and 2000 series. This
  417.      flag also enables use of the full SPARC v8 instruction set.
  418.      These options are deprecated and will be deleted in a future GCC
  419.      release.  They have been replaced with `-mcpu=xxx'.
  420. `-mcpu=CPU_TYPE'
  421.      Set the instruction set, register set, and instruction scheduling
  422.      parameters for machine type CPU_TYPE.  Supported values for
  423.      CPU_TYPE are `v7', `cypress', `v8', `supersparc', `sparclite',
  424.      `hypersparc', `sparclite86x', `f930', `f934', `sparclet',
  425.      `tsc701', `v9', and `ultrasparc'.
  426.      Default instruction scheduling parameters are used for values that
  427.      select an architecture and not an implementation.  These are `v7',
  428.      `v8', `sparclite', `sparclet', `v9'.
  429.      Here is a list of each supported architecture and their supported
  430.      implementations.
  431.               v7:             cypress
  432.               v8:             supersparc, hypersparc
  433.               sparclite:      f930, f934, sparclite86x
  434.               sparclet:       tsc701
  435.               v9:             ultrasparc
  436. `-mtune=CPU_TYPE'
  437.      Set the instruction scheduling parameters for machine type
  438.      CPU_TYPE, but do not set the instruction set or register set that
  439.      the option `-mcpu='CPU_TYPE would.
  440.      The same values for `-mcpu='CPU_TYPE are used for `-mtune='
  441.      CPU_TYPE, though the only useful values are those that select a
  442.      particular cpu implementation: `cypress', `supersparc',
  443.      `hypersparc', `f930', `f934', `sparclite86x', `tsc701',
  444.      `ultrasparc'.
  445. `-malign-loops=NUM'
  446.      Align loops to a 2 raised to a NUM byte boundary.  If
  447.      `-malign-loops' is not specified, the default is 2.
  448. `-malign-jumps=NUM'
  449.      Align instructions that are only jumped to to a 2 raised to a NUM
  450.      byte boundary.  If `-malign-jumps' is not specified, the default
  451.      is 2.
  452. `-malign-functions=NUM'
  453.      Align the start of functions to a 2 raised to NUM byte boundary.
  454.      If `-malign-functions' is not specified, the default is 2 if
  455.      compiling for 32 bit sparc, and 5 if compiling for 64 bit sparc.
  456.    These `-m' switches are supported in addition to the above on the
  457. SPARCLET processor.
  458. `-mlittle-endian'
  459.      Generate code for a processor running in little-endian mode.
  460. `-mlive-g0'
  461.      Treat register `%g0' as a normal register.  GCC will continue to
  462.      clobber it as necessary but will not assume it always reads as 0.
  463. `-mbroken-saverestore'
  464.      Generate code that does not use non-trivial forms of the `save' and
  465.      `restore' instructions.  Early versions of the SPARCLET processor
  466.      do not correctly handle `save' and `restore' instructions used with
  467.      arguments.  They correctly handle them used without arguments.  A
  468.      `save' instruction used without arguments increments the current
  469.      window pointer but does not allocate a new stack frame.  It is
  470.      assumed that the window overflow trap handler will properly handle
  471.      this case as will interrupt handlers.
  472.    These `-m' switches are supported in addition to the above on SPARC
  473. V9 processors in 64 bit environments.
  474. `-mlittle-endian'
  475.      Generate code for a processor running in little-endian mode.
  476. `-m32'
  477. `-m64'
  478.      Generate code for a 32 bit or 64 bit environment.  The 32 bit
  479.      environment sets int, long and pointer to 32 bits.  The 64 bit
  480.      environment sets int to 32 bits and long and pointer to 64 bits.
  481. `-mcmodel=medlow'
  482.      Generate code for the Medium/Low code model: the program must be
  483.      linked in the low 32 bits of the address space.  Pointers are 64
  484.      bits.  Programs can be statically or dynamically linked.
  485. `-mcmodel=medmid'
  486.      Generate code for the Medium/Middle code model: the program must
  487.      be linked in the low 44 bits of the address space, the text
  488.      segment must be less than 2G bytes, and data segment must be
  489.      within 2G of the text segment.  Pointers are 64 bits.
  490. `-mcmodel=medany'
  491.      Generate code for the Medium/Anywhere code model: the program may
  492.      be linked anywhere in the address space, the text segment must be
  493.      less than 2G bytes, and data segment must be within 2G of the text
  494.      segment.  Pointers are 64 bits.
  495. `-mcmodel=embmedany'
  496.      Generate code for the Medium/Anywhere code model for embedded
  497.      systems: assume a 32 bit text and a 32 bit data segment, both
  498.      starting anywhere (determined at link time).  Register %g4 points
  499.      to the base of the data segment.  Pointers still 64 bits.
  500.      Programs are statically linked, PIC is not supported.
  501. `-mstack-bias'
  502. `-mno-stack-bias'
  503.      With `-mstack-bias', GCC assumes that the stack pointer, and frame
  504.      pointer if present, are offset by -2047 which must be added back
  505.      when making stack frame references.  Otherwise, assume no such
  506.      offset is present.
  507. File: gcc.info,  Node: Convex Options,  Next: AMD29K Options,  Prev: SPARC Options,  Up: Submodel Options
  508. Convex Options
  509. --------------
  510.    These `-m' options are defined for Convex:
  511. `-mc1'
  512.      Generate output for C1.  The code will run on any Convex machine.
  513.      The preprocessor symbol `__convex__c1__' is defined.
  514. `-mc2'
  515.      Generate output for C2.  Uses instructions not available on C1.
  516.      Scheduling and other optimizations are chosen for max performance
  517.      on C2.  The preprocessor symbol `__convex_c2__' is defined.
  518. `-mc32'
  519.      Generate output for C32xx.  Uses instructions not available on C1.
  520.      Scheduling and other optimizations are chosen for max performance
  521.      on C32.  The preprocessor symbol `__convex_c32__' is defined.
  522. `-mc34'
  523.      Generate output for C34xx.  Uses instructions not available on C1.
  524.      Scheduling and other optimizations are chosen for max performance
  525.      on C34.  The preprocessor symbol `__convex_c34__' is defined.
  526. `-mc38'
  527.      Generate output for C38xx.  Uses instructions not available on C1.
  528.      Scheduling and other optimizations are chosen for max performance
  529.      on C38.  The preprocessor symbol `__convex_c38__' is defined.
  530. `-margcount'
  531.      Generate code which puts an argument count in the word preceding
  532.      each argument list.  This is compatible with regular CC, and a few
  533.      programs may need the argument count word.  GDB and other
  534.      source-level debuggers do not need it; this info is in the symbol
  535.      table.
  536. `-mnoargcount'
  537.      Omit the argument count word.  This is the default.
  538. `-mvolatile-cache'
  539.      Allow volatile references to be cached.  This is the default.
  540. `-mvolatile-nocache'
  541.      Volatile references bypass the data cache, going all the way to
  542.      memory.  This is only needed for multi-processor code that does
  543.      not use standard synchronization instructions.  Making
  544.      non-volatile references to volatile locations will not necessarily
  545.      work.
  546. `-mlong32'
  547.      Type long is 32 bits, the same as type int.  This is the default.
  548. `-mlong64'
  549.      Type long is 64 bits, the same as type long long.  This option is
  550.      useless, because no library support exists for it.
  551. File: gcc.info,  Node: AMD29K Options,  Next: ARM Options,  Prev: Convex Options,  Up: Submodel Options
  552. AMD29K Options
  553. --------------
  554.    These `-m' options are defined for the AMD Am29000:
  555. `-mdw'
  556.      Generate code that assumes the `DW' bit is set, i.e., that byte and
  557.      halfword operations are directly supported by the hardware.  This
  558.      is the default.
  559. `-mndw'
  560.      Generate code that assumes the `DW' bit is not set.
  561. `-mbw'
  562.      Generate code that assumes the system supports byte and halfword
  563.      write operations.  This is the default.
  564. `-mnbw'
  565.      Generate code that assumes the systems does not support byte and
  566.      halfword write operations.  `-mnbw' implies `-mndw'.
  567. `-msmall'
  568.      Use a small memory model that assumes that all function addresses
  569.      are either within a single 256 KB segment or at an absolute
  570.      address of less than 256k.  This allows the `call' instruction to
  571.      be used instead of a `const', `consth', `calli' sequence.
  572. `-mnormal'
  573.      Use the normal memory model: Generate `call' instructions only when
  574.      calling functions in the same file and `calli' instructions
  575.      otherwise.  This works if each file occupies less than 256 KB but
  576.      allows the entire executable to be larger than 256 KB.  This is
  577.      the default.
  578. `-mlarge'
  579.      Always use `calli' instructions.  Specify this option if you expect
  580.      a single file to compile into more than 256 KB of code.
  581. `-m29050'
  582.      Generate code for the Am29050.
  583. `-m29000'
  584.      Generate code for the Am29000.  This is the default.
  585. `-mkernel-registers'
  586.      Generate references to registers `gr64-gr95' instead of to
  587.      registers `gr96-gr127'.  This option can be used when compiling
  588.      kernel code that wants a set of global registers disjoint from
  589.      that used by user-mode code.
  590.      Note that when this option is used, register names in `-f' flags
  591.      must use the normal, user-mode, names.
  592. `-muser-registers'
  593.      Use the normal set of global registers, `gr96-gr127'.  This is the
  594.      default.
  595. `-mstack-check'
  596. `-mno-stack-check'
  597.      Insert (or do not insert) a call to `__msp_check' after each stack
  598.      adjustment.  This is often used for kernel code.
  599. `-mstorem-bug'
  600. `-mno-storem-bug'
  601.      `-mstorem-bug' handles 29k processors which cannot handle the
  602.      separation of a mtsrim insn and a storem instruction (most 29000
  603.      chips to date, but not the 29050).
  604. `-mno-reuse-arg-regs'
  605. `-mreuse-arg-regs'
  606.      `-mno-reuse-arg-regs' tells the compiler to only use incoming
  607.      argument registers for copying out arguments.  This helps detect
  608.      calling a function with fewer arguments than it was declared with.
  609. `-mno-impure-text'
  610. `-mimpure-text'
  611.      `-mimpure-text', used in addition to `-shared', tells the compiler
  612.      to not pass `-assert pure-text' to the linker when linking a
  613.      shared object.
  614. `-msoft-float'
  615.      Generate output containing library calls for floating point.
  616.      *Warning:* the requisite libraries are not part of GCC.  Normally
  617.      the facilities of the machine's usual C compiler are used, but
  618.      this can't be done directly in cross-compilation.  You must make
  619.      your own arrangements to provide suitable library functions for
  620.      cross-compilation.
  621. `-mno-multm'
  622.      Do not generate multm or multmu instructions.  This is useful for
  623.      some embedded systems which do not have trap handlers for these
  624.      instructions.
  625. File: gcc.info,  Node: ARM Options,  Next: Thumb Options,  Prev: AMD29K Options,  Up: Submodel Options
  626. ARM Options
  627. -----------
  628.    These `-m' options are defined for Advanced RISC Machines (ARM)
  629. architectures:
  630. `-mapcs-frame'
  631.      Generate a stack frame that is compliant with the ARM Procedure
  632.      Call Standard for all functions, even if this is not strictly
  633.      necessary for correct execution of the code.  Specifying
  634.      `-fomit-frame-pointer' with this option will cause the stack
  635.      frames not to be generated for leaf functions.  The default is
  636.      `-mno-apcs-frame'.
  637. `-mapcs'
  638.      This is a synonym for `-mapcs-frame'.
  639. `-mapcs-26'
  640.      Generate code for a processor running with a 26-bit program
  641.      counter, and conforming to the function calling standards for the
  642.      APCS 26-bit option.  This option replaces the `-m2' and `-m3'
  643.      options of previous releases of the compiler.
  644. `-mapcs-32'
  645.      Generate code for a processor running with a 32-bit program
  646.      counter, and conforming to the function calling standards for the
  647.      APCS 32-bit option.  This option replaces the `-m6' option of
  648.      previous releases of the compiler.
  649. `-mapcs-stack-check'
  650.      Generate code to check the amount of stack space available upon
  651.      entry to every function (that actually uses some stack space).  If
  652.      there is insufficient space available then either the function
  653.      `__rt_stkovf_split_small' or `__rt_stkovf_split_big' will be
  654.      called, depending upon the amount of stack space required.  The
  655.      run time system is required to provide these functions.  The
  656.      default is `-mno-apcs-stack-check', since this produces smaller
  657.      code.
  658. `-mapcs-float'
  659.      Pass floating point arguments using the float point registers.
  660.      This is one of the variants of the APCS.  This option is
  661.      reccommended if the target hardware has a floating point unit or
  662.      if a lot of floating point arithmetic is going to be performed by
  663.      the code.  The default is `-mno-apcs-float', since integer only
  664.      code is slightly increased in size if `-mapcs-float' is used.
  665. `-mapcs-reentrant'
  666.      Generate reentrant, position independent code.  This is the
  667.      equivalent to specifying the `-fpic' option.  The default is
  668.      `-mno-apcs-reentrant'.
  669. `-mthumb-interwork'
  670.      Generate code which supports calling between the ARM and THUMB
  671.      instruction sets.  Without this option the two instruction sets
  672.      cannot be reliably used inside one program.  The default is
  673.      `-mno-thumb-interwork', since slightly larger code is generated
  674.      when `-mthumb-interwork' is specified.
  675. `-mno-sched-prolog'
  676.      Prevent the reordering of instructions in the function prolog, or
  677.      the merging of those instruction with the instructions in the
  678.      function's body.  This means that all functions will start with a
  679.      recognisable set of instructions (or in fact one of a chioce from
  680.      a small set of different function prologues), and this information
  681.      can be used to locate the start if functions inside an executable
  682.      piece of code.  The default is `-msched-prolog'.
  683. `-mhard-float'
  684.      Generate output containing floating point instructions.  This is
  685.      the default.
  686. `-msoft-float'
  687.      Generate output containing library calls for floating point.
  688.      *Warning:* the requisite libraries are not available for all ARM
  689.      targets.  Normally the facilities of the machine's usual C
  690.      compiler are used, but this cannot be done directly in
  691.      cross-compilation.  You must make your own arrangements to provide
  692.      suitable library functions for cross-compilation.
  693.      `-msoft-float' changes the calling convention in the output file;
  694.      therefore, it is only useful if you compile *all* of a program with
  695.      this option.  In particular, you need to compile `libgcc.a', the
  696.      library that comes with GCC, with `-msoft-float' in order for this
  697.      to work.
  698. `-mlittle-endian'
  699.      Generate code for a processor running in little-endian mode.  This
  700.      is the default for all standard configurations.
  701. `-mbig-endian'
  702.      Generate code for a processor running in big-endian mode; the
  703.      default is to compile code for a little-endian processor.
  704. `-mwords-little-endian'
  705.      This option only applies when generating code for big-endian
  706.      processors.  Generate code for a little-endian word order but a
  707.      big-endian byte order.  That is, a byte order of the form
  708.      `32107654'.  Note: this option should only be used if you require
  709.      compatibility with code for big-endian ARM processors generated by
  710.      versions of the compiler prior to 2.8.
  711. `-mshort-load-bytes'
  712.      Do not try to load half-words (eg `short's) by loading a word from
  713.      an unaligned address.  For some targets the MMU is configured to
  714.      trap unaligned loads; use this option to generate code that is
  715.      safe in these environments.
  716. `-mno-short-load-bytes'
  717.      Use unaligned word loads to load half-words (eg `short's).  This
  718.      option produces more efficient code, but the MMU is sometimes
  719.      configured to trap these instructions.
  720. `-mshort-load-words'
  721.      This is a synonym for the `-mno-short-load-bytes'.
  722. `-mno-short-load-words'
  723.      This is a synonym for the `-mshort-load-bytes'.
  724. `-mbsd'
  725.      This option only applies to RISC iX.  Emulate the native BSD-mode
  726.      compiler.  This is the default if `-ansi' is not specified.
  727. `-mxopen'
  728.      This option only applies to RISC iX.  Emulate the native
  729.      X/Open-mode compiler.
  730. `-mno-symrename'
  731.      This option only applies to RISC iX.  Do not run the assembler
  732.      post-processor, `symrename', after code has been assembled.
  733.      Normally it is necessary to modify some of the standard symbols in
  734.      preparation for linking with the RISC iX C library; this option
  735.      suppresses this pass.  The post-processor is never run when the
  736.      compiler is built for cross-compilation.
  737. `-mcpu=<name>'
  738. `-mtune=<name>'
  739.      This specifies the name of the target ARM processor.  GCC uses
  740.      this name to determine what kind of instructions it can use when
  741.      generating assembly code.  Permissable names are: arm2, arm250,
  742.      arm3, arm6, arm60, arm600, arm610, arm620, arm7, arm7m, arm7d,
  743.      arm7dm, arm7di, arm7dmi, arm70, arm700, arm700i, arm710, arm710c,
  744.      arm7100, arm7500, arm7500fe, arm7tdmi, arm8, strongarm,
  745.      strongarm110, strongarm1100, arm8, arm810, arm9, arm9tdmi.
  746.      `-mtune=' is a synonym for `-mcpue=' to support older versions of
  747.      GCC.
  748. `-march=<name>'
  749.      This specifies the name of the target ARM architecture.  GCC uses
  750.      this name to determine what kind of instructions it can use when
  751.      generating assembly code.  This option can be used in conjunction
  752.      with or instead of the `-mcpu=' option.  Permissable names are:
  753.      armv2, armv2a, armv3, armv3m, armv4, armv4t
  754. `-mfpe=<number>'
  755. `-mfp=<number>'
  756.      This specifes the version of the floating point emulation
  757.      available on the target.  Permissable values are 2 and 3.  `-mfp='
  758.      is a synonym for `-mfpe=' to support older versions of GCC.
  759. `-mstructure-size-boundary=<n>'
  760.      The size of all structures and unions will be rounded up to a
  761.      multiple of the number of bits set by this option.  Permissable
  762.      values are 8 and 32.  The default value varies for different
  763.      toolchains.  For the COFF targeted toolchain the default value is
  764.      8.  Specifying the larger number can produced faster, more
  765.      efficient code, but can also increase the size of the program.
  766.      The two values are potentially incompatible.  Code compiled with
  767.      one value cannot necessarily expect to work with code or libraries
  768.      compiled with the other value, if they exchange information using
  769.      structures or unions.  Programmers are encouraged to use the 32
  770.      value as future versions of the toolchain may default to this
  771.      value.
  772. `-mabort-on-noreturn'
  773.      Generate a call to the function abort at the end of a noreturn
  774.      function.  It will be executed if the function tries to return.
  775. File: gcc.info,  Node: Thumb Options,  Next: MN10200 Options,  Prev: ARM Options,  Up: Submodel Options
  776. Thumb Options
  777. -------------
  778. `-mthumb-interwork'
  779.      Generate code which supports calling between the THUMB and ARM
  780.      instruction sets.  Without this option the two instruction sets
  781.      cannot be reliably used inside one program.  The default is
  782.      `-mno-thumb-interwork', since slightly smaller code is generated
  783.      with this option.
  784. `-mtpcs-frame'
  785.      Generate a stack frame that is compliant with the Thumb Procedure
  786.      Call Standard for all non-leaf functions.  (A leaf function is one
  787.      that does not call any other functions).  The default is
  788.      `-mno-apcs-frame'.
  789. `-mtpcs-leaf-frame'
  790.      Generate a stack frame that is compliant with the Thumb Procedure
  791.      Call Standard for all leaf functions.  (A leaf function is one
  792.      that does not call any other functions).  The default is
  793.      `-mno-apcs-leaf-frame'.
  794. `-mlittle-endian'
  795.      Generate code for a processor running in little-endian mode.  This
  796.      is the default for all standard configurations.
  797. `-mbig-endian'
  798.      Generate code for a processor running in big-endian mode.
  799. `-mstructure-size-boundary=<n>'
  800.      The size of all structures and unions will be rounded up to a
  801.      multiple of the number of bits set by this option.  Permissable
  802.      values are 8 and 32.  The default value varies for different
  803.      toolchains.  For the COFF targeted toolchain the default value is
  804.      8.  Specifying the larger number can produced faster, more
  805.      efficient code, but can also increase the size of the program.
  806.      The two values are potentially incompatible.  Code compiled with
  807.      one value cannot necessarily expect to work with code or libraries
  808.      compiled with the other value, if they exchange information using
  809.      structures or unions.  Programmers are encouraged to use the 32
  810.      value as future versions of the toolchain may default to this
  811.      value.
  812. File: gcc.info,  Node: MN10200 Options,  Next: MN10300 Options,  Prev: Thumb Options,  Up: Submodel Options
  813. MN10200 Options
  814. ---------------
  815.    These `-m' options are defined for Matsushita MN10200 architectures:
  816. `-mrelax'
  817.      Indicate to the linker that it should perform a relaxation
  818.      optimization pass to shorten branches, calls and absolute memory
  819.      addresses.  This option only has an effect when used on the
  820.      command line for the final link step.
  821.      This option makes symbolic debugging impossible.
  822. File: gcc.info,  Node: MN10300 Options,  Next: M32R/D Options,  Prev: MN10200 Options,  Up: Submodel Options
  823. MN10300 Options
  824. ---------------
  825.    These `-m' options are defined for Matsushita MN10300 architectures:
  826. `-mmult-bug'
  827.      Generate code to avoid bugs in the multiply instructions for the
  828.      MN10300 processors.  This is the default.
  829. `-mno-mult-bug'
  830.      Do not generate code to avoid bugs in the multiply instructions
  831.      for the MN10300 processors.
  832. `-mrelax'
  833.      Indicate to the linker that it should perform a relaxation
  834.      optimization pass to shorten branches, calls and absolute memory
  835.      addresses.  This option only has an effect when used on the
  836.      command line for the final link step.
  837.      This option makes symbolic debugging impossible.
  838. File: gcc.info,  Node: M32R/D Options,  Next: M88K Options,  Prev: MN10300 Options,  Up: Submodel Options
  839. M32R/D Options
  840. --------------
  841.    These `-m' options are defined for Mitsubishi M32R/D architectures:
  842. `-mcode-model=small'
  843.      Assume all objects live in the lower 16MB of memory (so that their
  844.      addresses can be loaded with the `ld24' instruction), and assume
  845.      all subroutines are reachable with the `bl' instruction.  This is
  846.      the default.
  847.      The addressability of a particular object can be set with the
  848.      `model' attribute.
  849. `-mcode-model=medium'
  850.      Assume objects may be anywhere in the 32 bit address space (the
  851.      compiler will generate `seth/add3' instructions to load their
  852.      addresses), and assume all subroutines are reachable with the `bl'
  853.      instruction.
  854. `-mcode-model=large'
  855.      Assume objects may be anywhere in the 32 bit address space (the
  856.      compiler will generate `seth/add3' instructions to load their
  857.      addresses), and assume subroutines may not be reachable with the
  858.      `bl' instruction (the compiler will generate the much slower
  859.      `seth/add3/jl' instruction sequence).
  860. `-msdata=none'
  861.      Disable use of the small data area.  Variables will be put into
  862.      one of `.data', `bss', or `.rodata' (unless the `section'
  863.      attribute has been specified).  This is the default.
  864.      The small data area consists of sections `.sdata' and `.sbss'.
  865.      Objects may be explicitly put in the small data area with the
  866.      `section' attribute using one of these sections.
  867. `-msdata=sdata'
  868.      Put small global and static data in the small data area, but do not
  869.      generate special code to reference them.
  870. `-msdata=use'
  871.      Put small global and static data in the small data area, and
  872.      generate special instructions to reference them.
  873. `-G NUM'
  874.      Put global and static objects less than or equal to NUM bytes into
  875.      the small data or bss sections instead of the normal data or bss
  876.      sections.  The default value of NUM is 8.  The `-msdata' option
  877.      must be set to one of `sdata' or `use' for this option to have any
  878.      effect.
  879.      All modules should be compiled with the same `-G NUM' value.
  880.      Compiling with different values of NUM may or may not work; if it
  881.      doesn't the linker will give an error message - incorrect code
  882.      will not be generated.
  883.